/**   
 * 项目名：五位一体化工安全信息平台
 * 日期：    2019-12-10 08:31:11  
 * Copyright (c) 2015- joysuch-版权所有     
 */

package com.joysuch.wwyt.core.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Id;
import javax.persistence.Table;

import com.joysuch.wwyt.core.support.AutoSetCommonFieldListener;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

@EntityListeners({ AuditingEntityListener.class, AutoSetCommonFieldListener.class })
@Entity
@Table(name = "wwyt_base_sub_system_menu_function")
public class BaseSubSystemMenuFunction implements java.io.Serializable {

    // columns START
    // 子系统ID
    private String subSystemId;
    // 菜单ID
    private String menuId;
    // 租户ID
    private Long tenentId;
    // 组织机构代码
    private String orgCode;
    // columns END

    @Id
    @Column(name = "SUB_SYSTEM_ID", length = 32)
    public String getSubSystemId() {
        return this.subSystemId;
    }

    public void setSubSystemId(String value) {
        this.subSystemId = value;
    }

    @Id
    @Column(name = "MENU_ID", length = 32)
    public String getMenuId() {
        return this.menuId;
    }

    public void setMenuId(String value) {
        this.menuId = value;
    }

    @Id
    @Column(name = "TENENT_ID")
    public Long getTenentId() {
        return this.tenentId;
    }

    public void setTenentId(Long value) {
        this.tenentId = value;
    }

    @Column(name = "ORG_CODE", length = 100)
    public String getOrgCode() {
        return this.orgCode;
    }

    public void setOrgCode(String value) {
        this.orgCode = value;
    }

    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("subSystemId", getSubSystemId())
                .append("menuId", getMenuId()).append("tenentId", getTenentId()).append("orgCode", getOrgCode())
                .toString();
    }

    public int hashCode() {
        return new HashCodeBuilder().toHashCode();
    }

    public boolean equals(Object obj) {
        if (obj instanceof BaseSubSystemMenuFunction == false)
            return false;
        if (this == obj)
            return true;
        BaseSubSystemMenuFunction other = (BaseSubSystemMenuFunction) obj;
        return new EqualsBuilder().isEquals();
    }
}
